package router

import (
	"exam12_23/internal/api"
	"exam12_23/internal/middleware"
	"github.com/gin-gonic/gin"
)

func Router(c *gin.Engine) {
	router := c.Group("v1")
	{
		router.GET("im", api.Chat)
		router.Use(middleware.MiddleWare())
		{
			router.GET("begin", api.BeginChat)
			router.POST("listMessage", api.ListMessage)
			router.POST("updateMessage", api.UpdateMassage)
			router.POST("upload", api.Upload)
		}
		UserRouter(router)
		FriendRouter(router)
	}
}
